#
# ttkiosk - table tennis club touch screen based kiosk.
# Copyright (C) 2009  Sergey Satskiy
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA  02110-1301, USA.
#
# $Id: StartScreen.py 40 2009-11-14 06:21:50Z sergey.satskiy $
#
# Generated by PyQt4 UI code generator 4.5.4 and then customized
#


from PyQt4 import QtCore, QtGui
import ui

class Ui_StartScreen(ui.FormBaseClass):
    def setupUi(self, StartScreen):
        ui.FormBaseClass.__init__(self)

        StartScreen.setObjectName("StartScreen")
        StartScreen.resize(785, 639)
        self.horizontalLayoutWidget = QtGui.QWidget(StartScreen)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 827, 601))
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtGui.QLabel(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.line_4 = QtGui.QFrame(self.horizontalLayoutWidget)
        self.line_4.setFrameShape(QtGui.QFrame.HLine)
        self.line_4.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_4.setObjectName("line_4")
        self.verticalLayout.addWidget(self.line_4)
        self.eventCalendar = QtGui.QCalendarWidget(self.horizontalLayoutWidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.eventCalendar.sizePolicy().hasHeightForWidth())
        self.eventCalendar.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setPointSize(24)
        font.setWeight(75)
        font.setBold(True)
        self.eventCalendar.setFont(font)
        self.eventCalendar.setFocusPolicy(QtCore.Qt.NoFocus)
        self.eventCalendar.setVerticalHeaderFormat(QtGui.QCalendarWidget.NoVerticalHeader)
        self.eventCalendar.setObjectName("eventCalendar")
        self.verticalLayout.addWidget(self.eventCalendar)
        self.line_5 = QtGui.QFrame(self.horizontalLayoutWidget)
        self.line_5.setFrameShape(QtGui.QFrame.HLine)
        self.line_5.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_5.setObjectName("line_5")
        self.verticalLayout.addWidget(self.line_5)
        self.label_2 = QtGui.QLabel(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.label_2.setFont(font)
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")
        self.verticalLayout.addWidget(self.label_2)
        self.currentEventsList = QtGui.QListWidget(self.horizontalLayoutWidget)
        self.currentEventsList.setFocusPolicy(QtCore.Qt.NoFocus)
        self.currentEventsList.setObjectName("currentEventsList")
        self.verticalLayout.addWidget(self.currentEventsList)
        spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        self.verticalLayout.addItem(spacerItem1)
        self.horizontalLayout.addLayout(self.verticalLayout)
        spacerItem2 = QtGui.QSpacerItem(5, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.line = QtGui.QFrame(self.horizontalLayoutWidget)
        self.line.setFrameShape(QtGui.QFrame.VLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName("line")
        self.horizontalLayout.addWidget(self.line)
        spacerItem3 = QtGui.QSpacerItem(5, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem3)
        self.verticalLayout_3 = QtGui.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.playersLabel = QtGui.QLabel(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.playersLabel.setFont(font)
        self.playersLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.playersLabel.setObjectName("playersLabel")
        self.verticalLayout_3.addWidget(self.playersLabel)
        self.line_3 = QtGui.QFrame(self.horizontalLayoutWidget)
        self.line_3.setFrameShape(QtGui.QFrame.HLine)
        self.line_3.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_3.setObjectName("line_3")
        self.verticalLayout_3.addWidget(self.line_3)
        self.playersList = QtGui.QListWidget(self.horizontalLayoutWidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.playersList.sizePolicy().hasHeightForWidth())
        self.playersList.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setPointSize(18)
        self.playersList.setFont(font)
        self.playersList.setFocusPolicy(QtCore.Qt.NoFocus)
        self.playersList.setObjectName("playersList")
        self.verticalLayout_3.addWidget(self.playersList)
        self.line_2 = QtGui.QFrame(self.horizontalLayoutWidget)
        self.line_2.setFrameShape(QtGui.QFrame.HLine)
        self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_2.setObjectName("line_2")
        self.verticalLayout_3.addWidget(self.line_2)
        self.addNewPlayerButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        self.addNewPlayerButton.setMinimumSize(QtCore.QSize(0, 40))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.addNewPlayerButton.setFont(font)
        self.addNewPlayerButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.addNewPlayerButton.setObjectName("addNewPlayerButton")
        self.verticalLayout_3.addWidget(self.addNewPlayerButton)
        spacerItem4 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        self.verticalLayout_3.addItem(spacerItem4)
        self.horizontalLayout.addLayout(self.verticalLayout_3)
        self.verticalLayout_4 = QtGui.QVBoxLayout()
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_4.addItem(spacerItem5)
        self.abButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.abButton.setFont(font)
        self.abButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.abButton.setObjectName("abButton")
        self.verticalLayout_4.addWidget(self.abButton)
        self.cdButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.cdButton.setFont(font)
        self.cdButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.cdButton.setObjectName("cdButton")
        self.verticalLayout_4.addWidget(self.cdButton)
        self.efButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.efButton.setFont(font)
        self.efButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.efButton.setObjectName("efButton")
        self.verticalLayout_4.addWidget(self.efButton)
        self.ghButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.ghButton.setFont(font)
        self.ghButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.ghButton.setObjectName("ghButton")
        self.verticalLayout_4.addWidget(self.ghButton)
        self.ijButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.ijButton.setFont(font)
        self.ijButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.ijButton.setObjectName("ijButton")
        self.verticalLayout_4.addWidget(self.ijButton)
        self.klButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.klButton.setFont(font)
        self.klButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.klButton.setObjectName("klButton")
        self.verticalLayout_4.addWidget(self.klButton)
        self.mnButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.mnButton.setFont(font)
        self.mnButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.mnButton.setObjectName("mnButton")
        self.verticalLayout_4.addWidget(self.mnButton)
        self.opButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.opButton.setFont(font)
        self.opButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.opButton.setObjectName("opButton")
        self.verticalLayout_4.addWidget(self.opButton)
        self.qrButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.qrButton.setFont(font)
        self.qrButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.qrButton.setObjectName("qrButton")
        self.verticalLayout_4.addWidget(self.qrButton)
        self.stButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.stButton.setFont(font)
        self.stButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.stButton.setObjectName("stButton")
        self.verticalLayout_4.addWidget(self.stButton)
        self.uvButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.uvButton.setFont(font)
        self.uvButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.uvButton.setObjectName("uvButton")
        self.verticalLayout_4.addWidget(self.uvButton)
        self.wxButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.wxButton.setFont(font)
        self.wxButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.wxButton.setObjectName("wxButton")
        self.verticalLayout_4.addWidget(self.wxButton)
        self.yzButton = QtGui.QPushButton(self.horizontalLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setWeight(75)
        font.setBold(True)
        self.yzButton.setFont(font)
        self.yzButton.setFocusPolicy(QtCore.Qt.NoFocus)
        self.yzButton.setObjectName("yzButton")
        self.verticalLayout_4.addWidget(self.yzButton)
        spacerItem6 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_4.addItem(spacerItem6)
        self.versionLabel = QtGui.QLabel(self.horizontalLayoutWidget)
        self.versionLabel.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.versionLabel.setObjectName("versionLabel")
        self.verticalLayout_4.addWidget(self.versionLabel)
        self.horizontalLayout.addLayout(self.verticalLayout_4)
        spacerItem7 = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem7)

        self.retranslateUi(StartScreen)
        QtCore.QMetaObject.connectSlotsByName(StartScreen)


    def retranslateUi(self, StartScreen):
        StartScreen.setWindowTitle(QtGui.QApplication.translate("StartScreen", "Form", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("StartScreen", "Events", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("StartScreen", "Current Events", None, QtGui.QApplication.UnicodeUTF8))
        self.playersLabel.setText(QtGui.QApplication.translate("StartScreen", "Players", None, QtGui.QApplication.UnicodeUTF8))
        self.addNewPlayerButton.setText(QtGui.QApplication.translate("StartScreen", "Register new player", None, QtGui.QApplication.UnicodeUTF8))
        self.abButton.setText(QtGui.QApplication.translate("StartScreen", "A - B", None, QtGui.QApplication.UnicodeUTF8))
        self.cdButton.setText(QtGui.QApplication.translate("StartScreen", "C - D", None, QtGui.QApplication.UnicodeUTF8))
        self.efButton.setText(QtGui.QApplication.translate("StartScreen", "E - F", None, QtGui.QApplication.UnicodeUTF8))
        self.ghButton.setText(QtGui.QApplication.translate("StartScreen", "G - H", None, QtGui.QApplication.UnicodeUTF8))
        self.ijButton.setText(QtGui.QApplication.translate("StartScreen", "I - J", None, QtGui.QApplication.UnicodeUTF8))
        self.klButton.setText(QtGui.QApplication.translate("StartScreen", "K - L", None, QtGui.QApplication.UnicodeUTF8))
        self.mnButton.setText(QtGui.QApplication.translate("StartScreen", "M - N", None, QtGui.QApplication.UnicodeUTF8))
        self.opButton.setText(QtGui.QApplication.translate("StartScreen", "O - P", None, QtGui.QApplication.UnicodeUTF8))
        self.qrButton.setText(QtGui.QApplication.translate("StartScreen", "Q - R", None, QtGui.QApplication.UnicodeUTF8))
        self.stButton.setText(QtGui.QApplication.translate("StartScreen", "S - T", None, QtGui.QApplication.UnicodeUTF8))
        self.uvButton.setText(QtGui.QApplication.translate("StartScreen", "U - V", None, QtGui.QApplication.UnicodeUTF8))
        self.wxButton.setText(QtGui.QApplication.translate("StartScreen", "W - X", None, QtGui.QApplication.UnicodeUTF8))
        self.yzButton.setText(QtGui.QApplication.translate("StartScreen", "Y - Z", None, QtGui.QApplication.UnicodeUTF8))
        self.versionLabel.setText(QtGui.QApplication.translate("StartScreen", "v. 0.0.1", None, QtGui.QApplication.UnicodeUTF8))


class StartScreen(QtGui.QWidget, Ui_StartScreen):
    def __init__(self, path, parent=None, f=QtCore.Qt.WindowFlags()):
        QtGui.QWidget.__init__(self, parent, f)

        self.setupUi(self)


    def setLayoutGeometry( self, width, height ):
        """ updates the whole form layout size """

        self.horizontalLayoutWidget.setGeometry( QtCore.QRect( 0, 0, width, height ) )
        return


